// 文件模块
import { request } from "@/utils/request";
export function filetext(data) {
  // 载荷谱文件传输接口
  return request("/first-service/file/upload", data, "post");
}
export function firetext(data) {
  // 载荷谱文件传输接口
  return request("/first-service/file/upload", data, "post");
}

export function firedelete(data) {
  // 载荷谱文件传输接口
  return request("/first-service/file/delete", data, "get");
}

export function filedelete(data) {
  // 载荷谱文件传输接口
  return request("/first-service/file/delete", data, "get");
}

export function deletefire(data) {
  // 载荷谱文件传输接口
  return request("/first-service/file/delete", data, "get");
}

export function deletefile(data) {
  // 载荷谱文件传输接口
  return request("/first-service/file/delete", data, "get");
}

export function testGet(data) {
  // 测试get接口
  return request("/api/testGet", data, "get");
}

export function testPost(data) {
  // 测试post接口
  return request("/api/testPost", data, "post");
}

export function comp_material_SNHF(data) {
  // 01常用材料的S-N曲线与海夫图
  return request("/second-service/material_SNHF", data, "get");
}
export  function comp_BevelAndCylindrical_Gears(data){
  //02一级锥齿轮与一级圆柱齿轮传动比分配
  return request("/second-service/namebevel_clinder_gear_ratio",data,"get");
}
export  function comp_nameRFC_matrix_deal(data){
  //<!--'05载荷谱雨流计数处理1'-->
  return request("/first-service/nameRFC_matrix_deal",data,"get");
}
export  function comp_namebevel_geaer_active_design(data){
  //19单级锥齿轮宏观参数设计及优化
  return request("/third-service/namebevel_geaer_active_design",data,"get");
}
export function comp_namemuti_power_loadshare_NW_statistics(data) {
  // 35功率分流轮系均载综合分析（NW型）
  return request("/third-service/namemuti_power_loadshare_NW_statistics", data, "get");
}
//吴璇斌

//19、20、21轴的振动计算

export function vibration_longitude_1(data) {
  //轴的弯曲振动中的悬臂简单轴弯曲振动
  return request("/third-service/vibration_one_fix", data, "get")
}
export function vibration_longitude_2(data) {
  //轴的弯曲振动中的两端铰链简单轴弯曲振动
  return request("/third-service/vibration_bi_gemel", data, "get")
}
export function vibration_longitude_3(data) {
  //轴的弯曲振动中的两端固链轴弯曲振动
  return request("/third-service/vibration_bi_fix", data, "get")
}
export function vibration_longitude_4(data) {
  //两端自由简单轴纵向振动
  return request("/third-service/vibration_longitude_fix", data, "get")
}
export function vibration_longitude_5(data) {
  //两端固链简单轴纵向振动
  return request("/third-service/vibration_longitude_free", data, "get")
}
export function vibration_longitude_6(data) {
  //悬臂简单轴纵向振动
  return request("/third-service/vibration_longitude_onefix", data, "get")
}
export function muti_power_loadshare_NW(data) {
  //2-34功率分流轮系均载初步分析（NW型）
  return request("/third-service/muti_power_loadshare_NW", data, "get")
}
export function planet_design_check_last(data) {
  //2-18单级行星轮系齿轮宏观参数设计及优化
   return request("/third-service/planet_design_check_last_1_20140930", data, "get")
  //return request("/planet_design_check_last_1_20140930", data, "get")
}
export function flowrate_of_nozzle(data) {
  //52单个喷孔流量计算
  return request("/fifth-service/flowrate_of_nozzle", data, "get")
}
export function moudule_SplineDesign(data) {
  //1-39渐开线花键参数设计
  return request("/fourth-service/moudule_SplineDesign", data, "get")
  // return request("/moudule_SplineDesign", data, "get")
}
//鲍萧阳
export function check(data) {
  //07内啮合齿轮强度校核
  return request("/third-service/check" ,data,"get");
}
export function mpldws(data) {
  //23功率分流轮系均载综合分析（WW型）
  return request("/third-service/mpldws" ,data,"get");
}
export function msrrclz(data) {
  //29单列径向滚子轴承
  return request("/fourth-service/msrrclz",data,"get");
}
export function bs(data) {
  //42高强度螺栓设计与校核
  return request("/fourth-service/bs",data,"get");
}
export function pedci(data) {
  //68单极内啮合齿轮宏观参数设计及优化
  return request("/third-service/pedci" ,data,"get");
}
//yjx
export function namemodule_bevel_gear_strength_static(data) {
  // 单列角接触与推力角接触
  return request("/fourth-service/namemodule_bevel_gear_strength_static", data, "get");
}
export function Interference_design(data) {
  // 37过盈配合设计计算
  return request("/fourth-service/Interference_design", data, "get");
}
export function OptiRatio_3stageP_increase_last(data){
  // 78三级NGW型行星轮系传动比分配
  return request("/second-service/OptiRatio_3stageP_increase_last",data,"get");
}
export function module_bearing_clearance(data){
  // 35滚动轴承游隙计算
  return request("/fourth-service/module_bearing_clearance",data,"get");
}
export function Nametransmisson(data){
  // 28外啮合齿面接触应力、传递误差分析及优化
  return request("/third-service/Nametransmisson",data,"get");
}
export function HammersMith_S_N(data){
  // 47合金钢件疲劳强度计算（GL）
  return request("/fifth-service/HammersMith_S_N",data,"get");
}
//wsl
export function damege(data) {
  //10锥齿轮强度校核
  return request("/third-service/bevel_gear_strength_safty_facor_Damege", data, "get");
}
export function gear_Micro_pitting_Calculation(data) {
  //11齿轮微点蚀计算
  // return request("/wsl-service/gear_Micro_pitting_Calculation_helical_gear", data, "get");
  return request("/third-service/gear_Micro_pitting_Calculation_helical_gear", data, "get");
}
export function speed(data) {
  //20临界转速计算
  return request("/third-service/critical_rotate_speed", data, "get");
}
export function bolt_check(data) {
  //44单自由度载荷时螺栓/螺钉强度校核
  return request("/fourth-service/bolt_check1", data, "get");
}
export function getans(data) {
  //65两级行星轮+两级NGW型平行轴传动比分配
  // return request("/wsl-service/optiRatio_twoplanet_add_twoparallel_last", data, "get");
  return request("/second-service/optiRatio_twoplanet_add_twoparallel_last", data, "get");
}
export function loadshare_planet1(data) {
  //81行星轮轮系均载初步分析
  return request("/third-service/loadshare_planet", data, "get");
}
//txh
export function case_depth(data) {
  // 12齿轮渗碳氮深度计算
  return request("/third-service/case_depth", data, "get");
}
export function two_planet_design_check_last_sn_20140930(data) {
  // 71两级行星轮系NGW齿轮宏观参数设计及优化
  return request("/third-service/two_planet_design_check_last_sn_20140930", data, "get");
}
export function pingxingzhouniehesunshi(data) {
  // 48-1平行轴齿轮功率损失
  return request("/fifth-service/pingxingzhouniehesunshi", data, "get");
}
export function xiaochilunjiaoyousunshi(data) {
  // 48-2 小齿轮搅油损失
  return request("/fifth-service/xiaochilunjiaoyousunshi", data, "get");
}
export function dachilunjiaoyousunshi(data) {
  // 48-3 大齿轮搅油损失
  return request("/fifth-service/dachilunjiaoyousunshi", data, "get");
}
export function bevel_planet_gear_ratio1(data) {
  // 55一级锥齿轮与一级行星轮系传动比分配
  return request("/second-service/bevel_planet_gear_ratio1", data, "get");
}
export function module_double_taper_rollerbearing_cal_last_z(data) {
  // 28单列/双列圆锥滚子轴承滚动体de受载与寿命计算
  return request("/fourth-service/yuanzhui", data, "get");
}

export function nametwo_planet_add_one_parallel_design_checkGet(data) {
  // 85 3级封闭差动齿轮宏观参数设计
  return request("/third-service/sanjifengbichadong", data, "get");
}

export function LDD_matrix_deal(data) {
  //02载荷谱持续计数处理
  return request("/first-service/LDD_matrix_deal", data, "get");
}

//单宇航
export function parallel_external_fatiguesafe_check(data) {
  // 06外啮合齿轮强度校核
  return request("/third-service/parallel_external_fatiguesafe_check", data, "get");
}
export function check2_32(data){
  // 22功率分流轮系均载初步分析（WW型）
  return request("/third-service/check2-32", data, "get");
}
export function check2(data) {
  // 56两级平行轴传动比分配
  return request("/second-service/check2-01", data, "get");
}
export function check2_16_1(data){
  // 67平行轴外啮合齿轮宏观参数设计(单级外啮合齿轮宏观参数设计及优化)
  return request("/third-service/check2-16-1", data, "get");
}


export function gear_modification(data) {
  //13齿轮修形设计计算
  return request("/third-service/gear_modification", data, "get");
}
export function module_double_radial_ballbearing_cal_last(data) {
  //82单列/双列深沟球轴承滚动体受载与寿命计算
  return request("/fourth-service/module_double_radial_ballbearing_cal_last", data, "get");
}
export function module_selfalign_ballbearing_cal_last(data) {
  //26调心球轴承滚动体受载与寿命计算
  return request("/fourth-service/module_selfalign_ballbearing_cal_last", data, "get");
}
export function module_radial_spher_rollerbearing(data) {
  //33球面滚子轴承滚动体受载与寿命计算
  return request("/fourth-service/module_radial_spher_rollerbearing_cal_last_z", data, "get");
}
export function optiRatio_twoparallel(data) {
  //54两级双联齿轮传动比分配
  return request("/second-service/OptiRatio_twoparallel_2_6_last", data, "get");
}
export function two_parallel_design_last_sn(data) {
  //72两级平行轴齿轮宏观参数设计及优化
  return request("/third-service/two_parallel_design_last_sn", data, "get");
}

//罗威
export function OptiRatio_4stageP_increase_last(data) {
  // 66四级NEW行星轮系传动比分配
  return request("/second-service/OptiRatio_4stageP_increase_last", data, "get");
}
export function Calculation_Paraller_Key1(data) {
  // 38平键强度校核
  return request("/fourth-service/Calculation_Paraller_Key1", data, "get");
}
export function Calculation_Parallel_Key2(data) {
  // 38平键强度校核
  return request("/fourth-service/Calculation_Parallel_Key2", data, "get");
}
export function namemodule_thrust_rollerbearing_cal_last_z(data) {
  // 34推力圆柱与推力滚针轴承
  return request("/fourth-service/namemodule_thrust_rollerbearing_cal_last_z", data, "get");
}
export function multi_bolt(data) {
  // 45多自由度螺栓强度校核
  return request("/fourth-service/multi_bolt", data, "get");
}
export function planet_loadshare_statistics(data) {
  // 09行星轮轮系均载综合分析
  return request("/third-service/planet_loadshare_statistics", data, "get");
}

//胡大智
export function gear1(data) {
  //17最小轴径计算
  return request("/third-service/API613_Design_Min_shaft_diameter", data, "get");
}
export function gear2(data) {
  //17最小轴径计算
  return request("/third-service/API613_Check_Min_shaft_diameter", data, "get");
}
export function gear3(data) {
  //17最小轴径计算
  return request("/third-service/CS_Machineries_Handbook_Design_Min_diameter", data, "get");
}
export function gear4(data) {
  //17最小轴径计算
  return request("/third-service/Cstiff_Machineries_Handbook_Min_diameter", data, "get");
}
export function gear5(data) {
  //17最小轴径计算
  return request("/third-service/A_Machineries_Handbook_Design_Min_shaft_diameteraa", data, "get");
}
export function o2(data) {
  // 60_1级行星轮系+2级平行轴
  return request("/second-service/OptiRatio_oneplanet_add_twoparallel_last0814", data, "get");
}
export function o3(data) {
  // 86_3级封闭差动传动比分配
  return request("/second-service/OptiRatio_3stageR_reduction_last", data, "get");
}
export function m1(data) {
  //04多自由度受载滚动轴承载荷分析
  return request("/first-service/Mutiaxes_Load_Bearing", data, "get");
}
export function o4(data) {
  //76一级NGW型行星轮+两级平行轴齿轮传动宏观参数设计及优化
  return request("/third-service/one_planet_add_two_parallel_design_last_sn_20140930", data, "get");
}

export function three_planet_design_check_last_sn_20140930(data) {
  //78三级NGW型行星轮系宏观参数设计/third-service
  return request("/third-service/three_planet_design_check_last_sn_20140930", data, "get");
}

//ws
export function nameloadspectrum_bending(data) {
  //03齿轮载荷持续谱分析
  return request("/first-service/nameloadspectrum_bending", data, "get");
}
export  function gear_flash_temperature_a(data){
  //15齿轮胶合计算（闪温）
  return request("/third-service/gear_flash_temperature_a",data,"get");
}
export function evaluating(data) {
  // 16齿轮胶合与磨损计算（AGMA）
  return request("/third-service/nameevaluating_scuffing_risk", data, "get");
}
export function CAL_Safety2Get(data) {
  //18轴疲劳静、强度计算
  return request("/third-service/CAL_Safety2", data, "get");
}
export  function double_row_angular_contact(data){
  //21双列角接触
  return request("/fourth-service/module_double_angle_contact",data,"get");
}

export function double(data){
  // 27单列/双列圆柱滚子轴承滚动体受载与寿命计算
  return request("/fourth-service/namemodule_double_cylin_rollerbearing_cal_last_z",data,"get");
}
export function module_four_point_contact_ballbearing_cal_last(data) {
  //30四点接触球
  return request("/fourth-service/module_four_point_contact_ballbearing_cal_last",data,"get")
}
export  function thrust_ball_bearing(data){
  //32 推力球轴承
  return request("/fourth-service/module_thrust_ballbearing_cal_last",data,"get");
}
export function bearing(data) {
  // 36轴承配合设计及校核
  return request("/fourth-service/moudule_bearing_fit", data, "get");
}
export function spline_SAE(data){
//40渐开线花键强度校核
  return request("/fourth-service/spline_SAE", data, "get");
}
export function namebolt_preload_1(data) {
  //43螺栓预紧力计算
  return request("/fourth-service/namebolt_preload_1",data,"get");
}
export function cast_steel_S_N_1Get(data) {
  //46轴疲劳静、强度计算铸铁或铸钢件疲劳强度计算
  return request("/fifth-service/namecast_settl_S_N", data, "get");
}
export  function bearing_power_loss(data){
  //50 轴承功率损失
  return request("/fifth-service/bearing_power_loss",data,"get");
}
export function namelubricate(data) {
  // 51油封和油泵损失
  return request("/fifth-service/namelubricate_youfengandyoubeng", data, "get");
}
export  function closed_differential_planetary(data){
  //58 封闭差动（行星架输入）传动比分配
  return request("/second-service/closed_differential_planetary",data,"get");
}
export function nameOptiRatio(data) {
  // 59封闭差动（同齿圈输出）传动比分配
  return request("/second-service/nameOptiRatio_2stageR_reduction_last", data, "get");
}
export function nameOptiRatio_twoplanet_add_oneparallel_lastGet(data) {
  //61两级行星轮+一级平行轴传动比分配
  return request("/second-service/nameOptiRatio_twoplanet_add_oneparallel_last", data, "get");
}
export function nameOpti(data){
  //62封闭差动(行星架输入)+1级平行轴传动比分配
  return request("/second-service/nameOpti",data,"get");
}

export function three_planet_design_check_last_sn(data) {
  //63三级NGW型行星轮系传动比分配
  return request("/seccond-service/three_planet_design_check_last_sn_20140930",data,"get")
}

export function nametwo_planet_add_one_parallel_design_check(data) {
  //87两级NGW型行星+一级平行轴齿轮传动宏观参数设计及优化
  return request("/third-service/nametwo_planet_one_parallel_design_check_last", data, "get");
}
export function closed_differential_planet(data){
  //74封闭差动（行星架输入）宏观参数设计及优化
  return request("/third-service/closed_differential_planet",data,"get");
}
export function star(data) {
  // 75封闭差动+一级平行轴齿轮传动宏观参数设计及优化
  //return request("/star_differ_one_parallel_design_last", data, "get");
  return request("/third-service/star_differ_one_parallel_design_last", data, "get");
}

//wxr
export function scuffing_integral_temperature(data){
  //14齿轮胶合与磨损计算（积温）
  return request("/third-service/scuffing_integral_temperature",data,"get");
}

export function module_bevel_gear_strength_static(data){
  //82差速器锥齿轮强度校核
  return request("/third-service/module_bevel_gear_strength_static",data,"get");
}

export function star_differ_planet_design_last_sn(data){
  //73封闭差动（同齿圈输出）
  //return request("/star_differ_planet_design_last_sn",data,"get");
  return request("/third-service/star_differ_planet_design_last_sn",data,"get");
}

export function OptiRatio_2stageP_increase_last(data){
  //57两级NGW型行星轮系传动比分配
  return request("/second-service/OptiRatio_2stageP_increase_last",data,"get");
}
//49行星轮系齿轮功率损失
export function lubricate_xingxinglunxi1(data){
  return request("/fifth-service/lubricate_xingxinglunxi1",data,"get");
}
export function lubricate_xingxinglunxi2(data){
  return request("/fifth-service/lubricate_xingxinglunxi2",data,"get");
}
export function lubricate_xingxinglunxi3(data){
  return request("/fifth-service/lubricate_xingxinglunxi3",data,"get");
}
export function lubricate_xingxinglunxi4(data){
  return request("/fifth-service/lubricate_xingxinglunxi4",data,"get");
}
export function lubricate_xingxinglunxi5(data){
  return request("/fifth-service/lubricate_xingxinglunxi5",data,"get");
}
//龙建军

export function parallel_planet_fatiguesafe_check(data) {
  //8 行星轮系齿轮宏观参数校核
  return request("/third-service/parallel_planet_fatiguesafe_check_20161212", data, "get");
}

export function pin_strength_calculation(data) {
  //41 销的计算
  return request("/fourth-service/pin_strength_calculation", data, "get");
}

export function optiRatio_threeparallel_last(data) {
  // 64 三级平行轴传动比分配
  return request("/second-service/OptiRatio_threeparallel_last", data, "get");
}

export function transmisson_error_calculate_internal(data) {
  //80 内齿合齿轮齿面接触应力与传递误差分析
  return request("/third-service/transmisson_error_calculate_internal", data, "get");
}

export function module_single_radial_ballbearing_cal_last(data) {
  // 83 单列深沟
  return request("/fourth-service/module_single_radial_ballbearing_cal_last", data, "get");
}

//二维数组转化为字符串
export function toString_(param_){
  console.log(param_[0])
  if(param_[0]!='{') {
    let length_ = param_.length
    let param = ''

    for (let i = 0; i < length_; i++) {
      if (i < length_ - 1) {
        param += '{' + param_[i].toString() + '},'
      } else {
        param += '{' + param_[i].toString() + '}'
      }
    }
    console.log(param)
    return param
  }
  return param_
}

//专家咨询系统接口
export function knowlege_catalog(data) {
  //return request("/KnowledgeConsumer/knowlege_catalog",data, "get1");
  return request("/KnowledgeProvider/knowlege_catalog",data, "get1");
}

export function knowlege_model_add(data) {
  return request("/KnowledgeProvider/knowlege_model_add", data, "post1");
}

export function knowlege_add(data) {
  return request("/KnowledgeProvider/knowlege_add", data, "post1");
}

export function knowlege_model_look(url,data) {
  return request(url,data, "get1");
}

export function knowlege_index(data) {
  return request("/KnowledgeProvider/knowlege_index",data, "get1");
}

export function knowlege_modify(data) {
  return request("/KnowledgeProvider/knowlege_modify", data, "put");
}

export function knowlege_catalog_add(data) {
  return request("/KnowledgeProvider/knowlege_catalog_add", data, "post1");
}

export function knowlege_search(url,data) {
  return request(url, data, "get1");
}

export function knowlege_index_look(url,data) {
  return request(url, data, "get1");
}

export function knowlege_catalog_delete(url,data) {
  return request(url, data, "delete");
}

export function knowlege_model_delete(url,data) {
  return request(url, data, "delete");
}
